<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #lb{background-color: pink}
        .a1{color: green}
        a,li{background-color: blue}
        /*未访问状态*/
        a:link{color: green}
        /*访问过*/
        a:visited{color: blue}
        /*悬停状态*/
        a:hover{color: red}
        /*点击状态*/
        a:active{color: yellow}
        [type="text"]{color: red}
        [type="password"]{background-color: green}
        body div div p{color: green}
        body>div>div>p{background-color: red}
    </style>
</head>
<body>
    <div id="lb">刘备</div>
    <div>关羽</div>
    <div class="a1">张飞</div>
    <p>悟空</p>
    <p>八戒</p>
    <p class="a1">沙僧</p>
<ul>
    <li>水煮鱼</li>
    <li>红烧肉</li>
    <li class="a1">黄焖鸡</li>
</ul>
    <input type="text">
    <input type="password">
<div>
    <p>p1</p>
    <div>
        <p>p2</p>
    </div>
    <div>
        <p>p3</p>
        <div>
            <p>p4</p>
        </div>
    </div>
    <a href="http://>www.tedu.com">TMOOC</a>
</div>
</body>
</html>